// --------------------------------------------------------------------------------------------
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
// 
// The contents of this file are subject to the Mozilla Public License Version
// 1.1 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
// http://www.mozilla.org/MPL/
// 
// Software distributed under the License is distributed on an "AS IS" basis,
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
// for the specific language governing rights and limitations under the
// License.
// 
// <remarks>
// Generated by IDLImporter from file nsIGeolocationProvider.idl
// 
// You should use these interfaces when you access the COM objects defined in the mentioned
// IDL/IDH file.
// </remarks>
// --------------------------------------------------------------------------------------------
namespace Gecko
{
	using System;
	using System.Runtime.InteropServices;
	using System.Runtime.InteropServices.ComTypes;
	using System.Runtime.CompilerServices;
	
	
	/// <summary>
    /// Interface provides a way for a geolocation provider to
    /// notify the system that a new location is available.
    /// </summary>
	[ComImport()]
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	[Guid("643dc5e9-b911-4b2c-8d44-603162696baf")]
	public interface nsIGeolocationUpdate
	{
		
		/// <summary>
        /// Notify the geolocation service that a new geolocation
        /// has been discovered.
        /// This must be called on the main thread
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void Update([MarshalAs(UnmanagedType.Interface)] nsIDOMGeoPosition position);
		
		/// <summary>
        /// Notify the geolocation service that the location has
        /// potentially changed, and thus a new position is in the
        /// process of being acquired.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void LocationUpdatePending();
		
		/// <summary>
        /// Notify the geolocation service of an error.
        /// This must be called on the main thread.
        /// The parameter refers to one of the constants in the
        /// nsIDOMGeoPositionError interface.
        /// Use this to report spurious errors coming from the
        /// provider; for errors occurring inside the methods in
        /// the nsIGeolocationProvider interface, just use the return
        /// value.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void NotifyError(ushort error);
	}
	
	/// <summary>
    /// Interface provides location information to the nsGeolocator
    /// via the nsIDOMGeolocationCallback interface.  After
    /// startup is called, any geo location change should call
    /// callback.update().
    /// </summary>
	[ComImport()]
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	[Guid("AC4A133B-9F92-4F7C-B369-D40CB6B17650")]
	public interface nsIGeolocationProvider
	{
		
		/// <summary>
        /// Start up the provider.  This is called before any other
        /// method.  may be called multiple times.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void Startup();
		
		/// <summary>
        /// watch
        /// When a location change is observed, notify the callback.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void Watch([MarshalAs(UnmanagedType.Interface)] nsIGeolocationUpdate callback);
		
		/// <summary>
        /// shutdown
        /// Shuts down the location device.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void Shutdown();
		
		/// <summary>
        /// hint to provide to use any amount of power to provide a better result
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void SetHighAccuracy([MarshalAs(UnmanagedType.U1)] bool enable);
	}
}
